<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">		
<html>								
<head>								
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">	
	<title> $fn</title>	
	<style type="text/css">		
	h1 {							
		font-size:28px;				
		font-family: verdana		
	}								
	p.otherNames{					
		font-size:20px;				
		font-family: verdana;		
	}								
	p.desc {						
		font-size:12px;				
		font-family: verdana;		
	}								
	p.doc {							
		margin-left:2cm;			
	}								
	td.doc {						
		font-size:12px;				
		font-family: verdana;		
		vertical-align:text-top;	
		padding-top: 6px;			
		padding-bottom: 12px;		
	}								
	tr.title {						
		font-family: verdana;		
		font-size:20px;				
		font-weight:bold;			
		background-color: #CCCCFF ;	
	}								
	code.simpledesc {				
		font-size:15px;				
		color: #000099; 			
	}								
	</style>						
</head>							
<body>											
<h1> $fn</h1>	
<p class="desc">								
Object providing a set of utility functions <br>
<br>
<br>
Since : 2.0.3<br>
</p>		
<table width="100%" border="1" cellspacing="0">		
<TR class="title">										
  <TD>Attributes and methods</TD>			
</TR>		
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.argumentsList(List fields) : String</B> </CODE>
<p class="doc">
Returns a string containing a list of field names separated by a comma<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>fields</b> : list of fields to be added in the arguments list<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;$fn.argumentsList( $entity.attributes )<br>
&nbsp;&nbsp;&nbsp;Returns : 'id, firstName, lastName, age' <br>
</code>
<br>
<b>Since : </b>2.0.5<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.argumentsListWithGetter(String object, List fields) : String</B> </CODE>
<p class="doc">
Returns a string containing a list of fields getters separated by a comma<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>object</b> : name of the object providing the getters<br>
&nbsp;&nbsp;&nbsp;<b>fields</b> : list of fields to be added in the arguments list<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;$fn.argumentsListWithGetter( 'person', $entity.attributes )<br>
&nbsp;&nbsp;&nbsp;Returns : 'person.getId(), person.getFirstName(), person.getLastName(), person.getAge()' <br>
</code>
<br>
<b>Since : </b>2.0.5<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.argumentsListWithType(List fields) : String</B> </CODE>
<p class="doc">
Returns a string containing a list of fields (type and name) separated by a comma<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>fields</b> : list of fields to be added in the arguments list<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;$fn.argumentsListWithType( $entity.attributes )<br>
&nbsp;&nbsp;&nbsp;Returns : 'int id, String firstName, String lastName, int age' <br>
</code>
<br>
<b>Since : </b>2.0.5<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.buildValues(List attributes, int step) : ValuesInContext</B> </CODE>
<p class="doc">
Builds a list of values (one value for each attribute)<br>
Those values are usable in test cases<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>attributes</b> : list of attributes requiring values<br>
&nbsp;&nbsp;&nbsp;<b>step</b> : a step (from 1 to N) used to change the values builded<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;$fn.buildValues($entity.attributes, 1) <br>
</code>
<br>
<b>Since : </b>2.1.1<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.capitalize(String string) : String</B> </CODE>
<p class="doc">
Capitalizes the given string<br>
changing the first letter to upper case<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>string</b> : the string to be capitalized<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;$fn.capitalize($var)<br>
</code>
<br>
<b>Since : </b>2.1.0<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.concatLists(List list1, List list2) : List<?></B> </CODE>
<p class="doc">
Concatenates 2 lists ( add all the elements of the second list at the end of the first one ) <br>
The 2 given lists remain unchanged. The result is stored in a new list.<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>list1</b> : List of objects<br>
&nbsp;&nbsp;&nbsp;<b>list2</b> : List of objects to be added at the end of list1<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;#set ( $list3 = $fn.concatLists( $list1, $list2 )  <br>
</code>
<br>
<b>Since : </b>2.0.7<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.escapeXml(String s) : String</B> </CODE>
<p class="doc">
Returns the XML string for the given string<br>
Replaces special characters (&, <, >, etc) by their corresponding XML notation <br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>s</b> : the string to be escaped<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.firstCharToUpperCase(String s) : String</B> </CODE>
<p class="doc">
Converts the first character to upper case<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>s</b> : the string to be converted<br>
<br>
<b>Since : </b>2.0.7<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.get(String objectName, Object defaultValue) : Any kind of object </B> </CODE>
<p class="doc">
Returns the object stored with the given name in the Velocity Context<br>
If there's no object for the given name the default value is returned<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>objectName</b> : the name (or key) in the Velocity Context<br>
&nbsp;&nbsp;&nbsp;<b>defaultValue</b> : the value to be returned if the object is not defined<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;$fn.get('groupId','defaultValue') <br>
</code>
<br>
<b>Since : </b>2.1.0<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.isBlank(String s) : boolean</B> </CODE>
<p class="doc">
Returns true if the given string is 'blank' <br>
(true if the string is null or void or only composed of blanks)<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>s</b> : the string to be tested<br>
<br>
<b>Since : </b>2.0.3<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.isDefined(String objectName) : boolean</B> </CODE>
<p class="doc">
Returns TRUE if the given object name is defined in the Velocity Context<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>objectName</b> : the name (or key) in the Velocity Context<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;#if ( $fn.isDefined('myvar') ) <br>
</code>
<br>
<b>Since : </b>2.1.0<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.isNotBlank(String s) : boolean</B> </CODE>
<p class="doc">
Returns true if the given string is not 'blank' <br>
(true if the string is not null, not void and not only composed of blanks)<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>s</b> : the string to be tested<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.isNotVoid(Object collection) : boolean</B> </CODE>
<p class="doc">
Returns TRUE if the given List/Array is NOT VOID<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>collection</b> : List or Array<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;#if ( $fn.isNotVoid( $entity.attributes ) ) <br>
</code>
<br>
<b>Since : </b>2.0.7<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.isVoid(Object collection) : boolean</B> </CODE>
<p class="doc">
Returns TRUE if the given List/Array is VOID<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>collection</b> : List or Array<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;#if ( $fn.isVoid( $entity.attributes ) ) <br>
</code>
<br>
<b>Since : </b>2.0.7<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.quote(String s) : String</B> </CODE>
<p class="doc">
Adds a double quote character at the beginning and at the end of the given string <br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>s</b> : the string to be quoted<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.size(Object collection) : int</B> </CODE>
<p class="doc">
Returns the SIZE of the given List or Array<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>collection</b> : List or Array<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;Number of attribute = $fn.size( $entity.attributes )  <br>
</code>
<br>
<b>Since : </b>2.0.7<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.tab : String</B> </CODE>
<p class="doc">
Returns a single tabulation character <br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.tab(int n) : String</B> </CODE>
<p class="doc">
Returns N tabulation characters <br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>n</b> : the number of tabulations to be returned<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.toLowerCase(String s) : String</B> </CODE>
<p class="doc">
Converts  all of the characters in the given string to lower case<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>s</b> : the string to be converted<br>
<br>
<b>Since : </b>2.0.7<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.toUpperCase(String s) : String</B> </CODE>
<p class="doc">
Converts  all of the characters in the given string to upper case<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>s</b> : the string to be converted<br>
<br>
<b>Since : </b>2.0.7<br>
</p>
</TD>
</TR>
<TR>
<TD class="doc" ><CODE class="simpledesc"> <B>.uncapitalize(String string) : String</B> </CODE>
<p class="doc">
Uncapitalizes the given string<br>
changing the first letter to lower case<br>
<br>
<b>Parameters : </b><br>
&nbsp;&nbsp;&nbsp;<b>string</b> : the string to be uncapitalized<br>
<br>
<b>Example : </b><br>
<code>
&nbsp;&nbsp;&nbsp;$fn.uncapitalize($var) <br>
</code>
<br>
<b>Since : </b>2.1.0<br>
</p>
</TD>
</TR>
</table>
</body>
</html>
